package com.solution.model;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * UserQuestionMappingId
 */
@Embeddable
public class UserQuestionMappingId  implements java.io.Serializable
 {

	
	private static final long serialVersionUID = 1L;
	
    private Long userInfoId;
    private Long questionTypeId;
    private Long markedAnswerTypeId;


    @Column(name="User_InfoID", nullable=false, precision=10, scale=0)
    public Long getUserInfoId() {
        return this.userInfoId;
    }
    
    public void setUserInfoId(Long userInfoId) {
        this.userInfoId = userInfoId;
    }

    @Column(name="Question_TypeID", nullable=false, precision=10, scale=0)
    public Long getQuestionTypeId() {
        return this.questionTypeId;
    }
    
    public void setQuestionTypeId(Long questionTypeId) {
        this.questionTypeId = questionTypeId;
    }

    @Column(name="Marked_Answer_TypeID", nullable=false, precision=10, scale=0)
    public Long getMarkedAnswerTypeId() {
        return this.markedAnswerTypeId;
    }
    
    public void setMarkedAnswerTypeId(Long markedAnswerTypeId) {
        this.markedAnswerTypeId = markedAnswerTypeId;
    }
    
   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof UserQuestionMappingId) ) return false;
		 UserQuestionMappingId castOther = ( UserQuestionMappingId ) other; 
         
		 return ( (this.getUserInfoId()==castOther.getUserInfoId()) || ( this.getUserInfoId()!=null && castOther.getUserInfoId()!=null && this.getUserInfoId().equals(castOther.getUserInfoId()) ) )
 && ( (this.getQuestionTypeId()==castOther.getQuestionTypeId()) || ( this.getQuestionTypeId()!=null && castOther.getQuestionTypeId()!=null && this.getQuestionTypeId().equals(castOther.getQuestionTypeId()) ) )
 && ( (this.getMarkedAnswerTypeId()==castOther.getMarkedAnswerTypeId()) || ( this.getMarkedAnswerTypeId()!=null && castOther.getMarkedAnswerTypeId()!=null && this.getMarkedAnswerTypeId().equals(castOther.getMarkedAnswerTypeId()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getUserInfoId() == null ? 0 : this.getUserInfoId().hashCode() );
         result = 37 * result + ( getQuestionTypeId() == null ? 0 : this.getQuestionTypeId().hashCode() );
         result = 37 * result + ( getMarkedAnswerTypeId() == null ? 0 : this.getMarkedAnswerTypeId().hashCode() );
         return result;
   }   


}


